<script src="{VAR:HOST}system/thirdparty/codemirror/js/codemirror.js" type="text/javascript"></script>
    <style type="text/css">
      .CodeMirror-line-numbers {
        width: 2.2em;
        color: #aaa;
        background-color: #eee;
        text-align: right;
        padding-right: .3em;
        font-size: 10pt;
        font-family: monospace;
        padding-top: .4em;
        line-height: normal;
      }
    </style>

<table>
	<tr>
		<td valign="top">Select (SQL):</td>
		<td style="border:1px solid #666"><textarea name="select" id="select" cols="90" rows="5">{VAR:SELECT}</textarea></td>
	</tr>
	<tr>
		<td>Template:</td>
		<td><input name="template" value="{VAR:TEMPLATE}" /></td>
	</tr>
</table>

<script type="text/javascript">
  var editor = CodeMirror.fromTextArea('select', {
    height: "95px",
    parserfile: "parsesparql.js",
    stylesheet: "{VAR:HOST}system/thirdparty/codemirror/css/sparqlcolors.css",
    path: "{VAR:HOST}system/thirdparty/codemirror/js/",
    continuousScanning: 500,
    lineNumbers: true
  });
</script>

<input name="save" type="submit" value="{LANG:CHANGE}" />